package com.learn2.controller;

import com.learn2.domain.DemoObj;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 14:56 2018-11-15
 * @Modify by:
 */
@RestController
public class DemoAnnoController2 {

  @RequestMapping(value = "/json" ,produces = "application/json; charset=utf-8")
  public DemoObj returnJson(){
    DemoObj demoObj=new DemoObj();
    demoObj.setId("6666");
    demoObj.setName("王二麻子");
    return demoObj;
  }

}
